#include <stdio.h>

int main()
{
    FILE* fp = fopen("log.txt", "w");
    if(fp == NULL)
    {
        perror("fopen");
        return 1;
    }

    const char* massage = "hello world\n";
    int i = 0;
    while(i < 10)
    {
        fputs(massage, fp);
        i++;
    }
    fclose(fp);

    return 0;
}
